<?php if(!defined('IN_PISCES')){exit('Access Denied.');}?>
<script language="javascript" src="{$this->data['baseurl']}js/jquery/jquery.js"></script>
<script language="javascript" type="text/javascript">
function doLogin(){
	$('#logon_hint_logon').html('');
	var username	= $('#txtUsername').val();
	var password	= $('#txtPassword').val();
	var loginUrl	= $('#hdLoginUrl').val();
	
	$('#logon_hint_logon').html('正在登录...');
	
	$.ajax({
	    url: loginUrl,
	    type: 'POST',
	    data:{'username':username,'password':password,'rnum':Math.random()},
	    dataType: 'json',
	    success: function(res){
			if(res.code<=0){
				$('#logon_hint_logon').html('登录失败，请检查你的输入！');
			}else{
				document.location	= res.data.forward;
			}
		},
		error:function(res){
			alert(res.responseText);
		}
	});
}
</script>
<div class="grid_12">
	<div class="new_header" style="height:50px;">
	<div class="header_top" style="padding-left:0px;">
		<h1><a class="logo_new" href="{$this->data['baseurl']}"></a><span class="none">{$this->data['site']['site_name']}</span></h1>
	</div>
	<div class="clear"></div>
</div>		
</div>
<div class="clear"></div>
<div class="grid_12">


	
<div class="box_shadow p13 mt14 mb14">
	<div class="login-page">
		<form action="" method="post" id="loginForm" >

			<h1>登录{$this->data['site']['site_name']}</h1>
			<div class="dash-line"></div>
			<div class="logon_form_input_email ">
				<div class="titleBox left">账　号：</div>
				<div class="titleBox left">
					<input type="text" id="txtUsername" class="logonInput" value=""  />
				</div>
				<div class="clear-fix"></div>

			</div>
			<div class="logon_form_input_pass">
				<!-- <div class="passwordMask" id="passwordMask" >请输入密码</div> -->
				<div class="">
					<div class="left titleBox">密　码：</div>
					<div class="left"><input type="password" id="txtPassword" class=" logonInput" value="" /></div>
				</div>
			</div>

	        <!-- ./#logon_form_input_auth -->

			<div class="clear-fix"></div>
			<div class="remember-me">
				<input type="checkbox" name="remember" class="checkbox" checked="checked" value="1209600">
				<label for="savestate">记住我（两周免登陆）</label>
			</div>
	
			<div id="logon_hint_logon" class="logon_hint_logon"></div>
			<input type="button"  onclick="doLogin()" value="登   录" class="button button-100 submitLogon" />
			<input type="hidden" id="hdLoginUrl" value="{url('User','DoLogin')}" />
			<div id="forget_password" class="forget_password">

				<a class='a1' href="{url('User','ForgetPassword')}" target='_blank'>忘记密码了?</a>
			</div>
					</form>
		<div class="user-logon-right">
			<div class="reg-desc">还没有{$this->data['site']['site_name']}账号？ <a href="{url('User','Setup')}">立即注册</a></div>
			<div class="mt30 f16n">
				你还可以用以下方式直接登录：
				<div class="mt10" style="width:280px;">

					<a class="reg_sinaweibo" href="{url('Auth','Sina')}" target="_blank"></a>
					<a class="reg_qq" href="{url('Auth','QQ')}" target="_blank"></a>
					<a class="reg_taobao" href="{url('Auth','Tabao')}" target="_blank"></a>
					<a class="reg_renren" href="{url('Auth','Renren')}" target="_blank" ></a>
					<a class="reg_wangyi" href="{url('Auth','Wangyi')}" target="_blank" ></a>
					<a class="reg_douban" href="{url('Auth','Douban')}" target="_blank" ></a>
					<a class="reg_baidu" href="{url('Auth','Baidu')}" target="_blank" ></a>
					<div class="clear"></div>

				</div>
			</div>
		</div>
	</div><!-- /.login-page -->
</div>
</div>